const { defineConfig } = require("@vue/cli-service");

function getBaseURL() {
  let base = ''
  const deployEnv = process.env.DREAMENV
  const date = new Date()
  const prefix = `${process.env.CI_PROJECT_NAME}/${
    date.getFullYear()}${`0${date.getMonth() + 1}`.slice(-2)}${`0${date.getDate()}`.slice(-2)}/`
  switch (deployEnv) {
    case 'TEST':
      base = process.env.TEST_RESOURCE_DOMAIN + prefix
      break
    case 'PROD':
      base = process.env.PROD_RESOURCE_DOMAIN + prefix
      break
    default:
      base = './'
      break
  }
  return base
}

module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: '/console/',
});
